package com.ytjj.qmyx.admin.controller;

import com.ytjj.common.api.CommonResult;
import com.ytjj.qmyx.admin.annotation.OperLog;
import com.ytjj.qmyx.admin.constants.SysLogConstants;
import com.ytjj.qmyx.admin.service.DataStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 *
 *
 * @Version: 1.0
 *
 * 数据统计-首页
 */
@RestController
@RequestMapping("/dataStatistics")
public class DataStatisticsController {

    @Autowired
    private DataStatisticsService dataStatisticsService;

    @PostMapping("/view")
    @OperLog(operModule = "数据统计模块", operDesc = "首页数据统计数据", operType = SysLogConstants.OPERATION_SELECT)
    public CommonResult getDataStatistics() {
        return CommonResult.success(dataStatisticsService.getDataInfo());
    }

}
